home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 7: Sunsite / Linux Cubed Series 7 - Sunsite Vol 1.iso / libs / libelf-0.5 / libelf-0 / libelf-0.5.2 / Makefile.in < prev    next >
Encoding:
Makefile  |  1995-10-23  |  7.0 KB  |  258 lines

  1. # Makefile for libelf.
  2. # Copyright (C) 1995 Michael Riepe <riepe@ifwsn4.ifw.uni-hannover.de>
  3. # This library is free software; you can redistribute it and/or
  4. # modify it under the terms of the GNU Library General Public
  5. # License as published by the Free Software Foundation; either
  6. # version 2 of the License, or (at your option) any later version.
  7. # This library is distributed in the hope that it will be useful,
  8. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  10. # Library General Public License for more details.
  11. # You should have received a copy of the GNU Library General Public
  12. # License along with this library; if not, write to the Free Software
  13. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  14.  
  15. prefix = @prefix@
  16. exec_prefix = @exec_prefix@
  17. bindir = $(exec_prefix)/bin
  18. libdir = $(exec_prefix)/lib
  19. datadir = $(prefix)/share
  20. localedir = $(datadir)/locale
  21. includedir = $(prefix)/include
  22. mandir = $(prefix)/man/man$(manext)
  23. manext = 3
  24. installdirs = $(libdir) $(includedir) $(includedir)/libelf
  25.  
  26. CC = @CC@
  27. AR = ar
  28. MV = mv -f
  29. RM = rm -f
  30. LN_S = @LN_S@
  31. RANLIB = @RANLIB@
  32. GENCAT = @GENCAT@
  33. INSTALL = @INSTALL@
  34. INSTALL_DATA = @INSTALL_DATA@
  35. INSTALL_PROGRAM = @INSTALL_PROGRAM@
  36.  
  37. CFLAGS = @CFLAGS@
  38. CPPFLAGS = @CPPFLAGS@
  39. DEFS = -DHAVE_CONFIG_H
  40. LDFLAGS = @LDFLAGS@
  41. LIBS = @LIBS@
  42.  
  43. COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
  44.  
  45. # no user serviceable parts below
  46.  
  47. PACKAGE = @PACKAGE@
  48. VERSION = @VERSION@
  49. MAJOR = @MAJOR@
  50.  
  51. SHELL = /bin/sh
  52. @SET_MAKE@
  53.  
  54. srcdir = @srcdir@
  55. VPATH = @srcdir@
  56.  
  57. SUBDIRS = shared support
  58.  
  59. .SUFFIXES:
  60. .SUFFIXES: .c .o
  61. .c.o:
  62.     @$(RM) $@
  63.     $(COMPILE) $<
  64.  
  65. INCLUDES = -I. -I$(srcdir)
  66.  
  67. # generic sources
  68. SRCS1 = begin.c cntl.c end.c errmsg.c errno.c fill.c flag.c getarhdr.c \
  69.     getarsym.c getbase.c getdata.c getident.c getscn.c hash.c kind.c \
  70.     ndxscn.c newdata.c newscn.c next.c nextscn.c rand.c rawdata.c \
  71.     rawfile.c strptr.c update.c version.c
  72. OBJS1 = begin.o cntl.o end.o errmsg.o errno.o fill.o flag.o getarhdr.o \
  73.     getarsym.o getbase.o getdata.o getident.o getscn.o hash.o kind.o \
  74.     ndxscn.o newdata.o newscn.o next.o nextscn.o rand.o rawdata.o \
  75.     rawfile.o strptr.o update.o version.o
  76.  
  77. # 32-bit sources
  78. SRCS2 = 32.fsize.c 32.getehdr.c 32.getphdr.c 32.getshdr.c 32.newehdr.c \
  79.     32.newphdr.c 32.xlatetof.c
  80. OBJS2 = 32.fsize.o 32.getehdr.o 32.getphdr.o 32.getshdr.o 32.newehdr.o \
  81.     32.newphdr.o 32.xlatetof.o
  82.  
  83. # support
  84. SRCS3 = cook.c data.c input.c
  85. OBJS3 = cook.o data.o input.o
  86.  
  87. # nlist
  88. SRCS4 = nlist.c
  89. OBJS4 = nlist.o
  90.  
  91. SRCS = $(SRCS1) $(SRCS2) $(SRCS3) $(SRCS4)
  92. OBJS = $(OBJS1) $(OBJS2) $(OBJS3) $(OBJS4)
  93.  
  94. # missing functions
  95. LIBSRCS = memset.c
  96. LIBOBJS = @LIBOBJS@
  97.  
  98. # header files to be installed
  99. HDRS = libelf.h nlist.h
  100. AUXHDRS = @install_headers@
  101.  
  102. DISTFILES = $(SRCS) $(LIBSRCS) byteswap.h errors.h private.h nlist.h \
  103.     ext_types.h configure Makefile.in config.h.in libelf.h.in \
  104.     stamp-h.in install-sh mkinstalldirs mkmsgs configure.in \
  105.     aclocal.m4 acconfig.h COPYING.LIB INSTALL README
  106.  
  107. all: $(HDRS) $(AUXHDRS) libelf.a
  108.  
  109. shared: $(HDRS) $(AUXHDRS) shared/libelf.so.$(MAJOR)
  110. shared/libelf.so.$(MAJOR):
  111.     cd shared && $(MAKE) all
  112.  
  113. libelf.h: libelf.h.in config.status
  114.     CONFIG_FILES=$@ CONFIG_HEADERS= ./config.status
  115.  
  116. $(AUXHDRS):
  117.     @$(RM) $@
  118.     $(LN_S) $(srcdir)/support/$@ $@
  119.  
  120. libelf.a: $(OBJS) $(LIBOBJS)
  121.     @$(RM) $@
  122.     $(AR) rcv $@ $(OBJS) $(LIBOBJS)
  123.     $(RANLIB) $@
  124.  
  125. install: all installdirs install-exec install-data
  126.  
  127. installdirs: mkinstalldirs
  128.     $(SHELL) $(srcdir)/mkinstalldirs $(installdirs)
  129.  
  130. install-exec:
  131.     $(INSTALL_DATA) libelf.a $(libdir)
  132.     -cd $(libdir) && $(RANLIB) libelf.a
  133.  
  134. install-data:
  135.     for file in $(HDRS); do \
  136.       $(INSTALL_DATA) $(srcdir)/$$file $(includedir)/libelf || exit 1; \
  137.       if [ ! -f $(includedir)/$$file ]; then \
  138.         echo "#include <libelf/$$file>" > $(includedir)/$$file; \
  139.       fi; \
  140.     done
  141.     for file in .. $(AUXHDRS); do \
  142.       if [ x"$$file" = x".." ]; then true; else \
  143.         $(INSTALL_DATA) $$file $(includedir)/libelf || exit 1; \
  144.         if [ ! -f $(includedir)/$$file ]; then \
  145.           echo "#include <libelf/$$file>" > $(includedir)/$$file; \
  146.         fi; \
  147.       fi; \
  148.     done
  149.  
  150. install-shared:
  151.     cd shared && $(MAKE) install
  152.  
  153. uninstall: uninstall-shared
  154.     $(RM) $(libdir)/libelf.a
  155.     $(RM) -r $(includedir)/libelf
  156.  
  157. uninstall-shared:
  158.     cd shared && $(MAKE) uninstall
  159.  
  160. mostlyclean: mostlyclean-recursive mostlyclean-local
  161. clean: clean-recursive clean-local
  162. distclean: distclean-recursive distclean-local
  163. maintainer-clean: maintainer-clean-recursive maintainer-clean-local
  164.  
  165. clean-recursive distclean-recursive \
  166. mostlyclean-recursive maintainer-clean-recursive:
  167.     for subdir in $(SUBDIRS); do \
  168.       target=`echo $@|sed 's/-recursive//'`; \
  169.       echo making $$target in $$subdir; \
  170.       (cd $$subdir && $(MAKE) $$target) || exit 1; \
  171.     done
  172.  
  173. mostlyclean-local:
  174.     $(RM) *~ core a.out errlist Log
  175.  
  176. clean-local: mostlyclean-local
  177.     $(RM) *.[oa] *.m *.cat config.log
  178.  
  179. distclean-local: clean-local
  180.     $(RM) Makefile config.cache config.h config.status libelf.h stamp-h $(AUXHDRS)
  181.  
  182. maintainer-clean-local: distclean-local
  183.     @echo "This command is intended for maintainers to use;"
  184.     @echo "it deletes files that may require special tools to rebuild."
  185.     $(RM) configure config.h.in stamp-dist
  186.     $(RM) -r $(distdir)
  187.  
  188. .SUFFIXES: .m .cat
  189. .m.cat:
  190.     @$(RM) $@
  191.     $(GENCAT) $@ $<
  192.  
  193. libelf.m: errors.h mkmsgs
  194.     @$(RM) $@
  195.     $(SHELL) $(srcdir)/mkmsgs < $(srcdir)/errors.h > $@
  196.  
  197. distdir = $(PACKAGE)-$(VERSION)
  198. dist: stamp-dist
  199. stamp-dist: $(DISTFILES)
  200.     $(RM) -r $(distdir)
  201.     mkdir $(distdir)
  202.     for file in $(DISTFILES); do \
  203.       ln $(srcdir)/$$file $(distdir) || \
  204.         cp -p $(srcdir)/$$file $(distdir) || exit 1; \
  205.     done
  206.     for subdir in $(SUBDIRS); do \
  207.       mkdir $(distdir)/$$subdir || exit 1; \
  208.       (cd $$subdir && $(MAKE) dist) || exit 1; \
  209.     done
  210.     -$(RM) $(distdir).tar.gz.bak $(PACKAGE).tar.gz
  211.     -$(MV) $(distdir).tar.gz $(distdir).tar.gz.bak
  212.     tar cvfz $(distdir).tar.gz $(distdir)
  213.     $(LN_S) $(distdir).tar.gz $(PACKAGE).tar.gz
  214.     $(RM) stamp-dist && echo timestamp > stamp-dist
  215.  
  216. # For the justification of the following Makefile rules, see node
  217. # `Automatic Remaking' in GNU Autoconf documentation.
  218.  
  219. configure: configure.in aclocal.m4
  220.     cd $(srcdir) && autoconf
  221.  
  222. config.h.in: stamp-h.in
  223. stamp-h.in: configure.in acconfig.h
  224.     cd $(srcdir) && autoheader
  225.     cd $(srcdir) && rm -f stamp-h.in && echo timestamp > stamp-h.in
  226.  
  227. config.h: stamp-h
  228. stamp-h: config.h.in config.status
  229.     CONFIG_FILES= CONFIG_HEADERS=config.h ./config.status
  230.     rm -f stamp-h && echo timestamp > stamp-h
  231.  
  232. Makefile: Makefile.in config.status
  233.     CONFIG_FILES=$@ CONFIG_HEADERS= ./config.status
  234.  
  235. shared/Makefile: shared/Makefile.in config.status
  236.     CONFIG_FILES=$@ CONFIG_HEADERS= ./config.status
  237.  
  238. support/Makefile: support/Makefile.in config.status
  239.     CONFIG_FILES=$@ CONFIG_HEADERS= ./config.status
  240.  
  241. config.status: configure config.h.in
  242.     CFLAGS='$(CFLAGS)' ./config.status --recheck
  243.  
  244. # Tell versions [3.59,3.63) of GNU make not to export all variables.
  245. # Otherwise a system limit (for SysV at least) may be exceeded.
  246. .NOEXPORT:
  247.  
  248. # dependencies
  249. $(OBJS): private.h config.h libelf.h.in errors.h $(AUXHDRS)
  250. 32.xlatetof.o: byteswap.h ext_types.h
  251. 32.fsize.o: ext_types.h
  252. getarsym.o: byteswap.h
  253. nlist.o: nlist.h
  254. $(LIBOBJS): config.h
  255.